/*
 * Point3D.h
 *
 *  Created on: Jul 2, 2011
 *      Author: fqhuy
 */

#ifndef POINT3D_H_
#define POINT3D_H_

template<class T> class Point3D {
	T x_, y_, z_;
public:

	inline int setX(T x) {
		x_ = x;
	}
	inline int setY(T y) {
		y_ = y;
	}
	inline int setZ(T z) {
		z_ = z;
	}
	inline T X() {
		return x_;
	}
	inline T Y() {
		return y_;
	}
	inline T Z() {
		return z_;
	}

	Point3D<T>& operator=(const Point3D<T>& p) ;
	Point3D();
	Point3D(T x, T y, T z) :
		x_(x), y_(y), z_(z) {

	}
	explicit Point3D(const Point3D<T>& pt);
	virtual ~Point3D();
};

template<class T> inline Point3D<T>& Point3D<T>::operator = (const Point3D& pt)
{ x_ = pt.x_; y_ = pt.y_; z_ = pt.z_; return *this; }

template<class T> inline Point3D<T>::Point3D(const Point3D& pt) : x_(pt.x_), y_(pt.y_), z_(pt.z_) {}

#endif /* POINT3D_H_ */
